<template>
  <div >
    <div class="card-list" v-if="list && list.length > 0">
      <div class="card-box" v-for="(item, index) in list" :key="index">
        <Card :item="item"></Card>
      </div>
    </div>
    <div class="card-empty" v-else>暂无数据...</div>
  </div>
</template>
<script>
import Card from "./card";
export default {
  name: "CardList",
  props: {
    list: {
      type: Array,
      defult: [],
    },
  },
  components: {
    Card,
  },
  data() {
    return {};
  },
};
</script>
<style lang="less" scoped>
.card-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 27px;
  .card-box {
    flex: 0 0 47%;
    background: #fff;
    padding: 14px 14px 14px 25px;
    margin-bottom: 25px;
    border-radius: 5px;
  }
}
.card-empty{
  width: 200px;
  margin:100px auto;
  color:#fff;
  font-size: 24px;
  text-align: center;
  height: 60px;
}
</style>
